﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Data.Objects;
using System.Linq;
using System.Web;
using KPIS.GERP.Models.SYS;

namespace MvcApplication1
{ 
    //public class GERPObjectContext : ObjectContext
    //{
    //    public ObjectSet<KPIS.GERP.Models.SYS.User> Users { get; set; }
        
    //    public GERPObjectContext() : this("name=GERPContext") { }

    //    public GERPObjectContext(string connectionString)
    //        : base(connectionString, "GERPContext")
    //    {
    //        Users = CreateObjectSet<User>();



    //        //Turned off to avoid problems with serialization
    //        ContextOptions.ProxyCreationEnabled = false;
    //        ContextOptions.LazyLoadingEnabled = false;
    //    }
 
    //    public void SetModified(object entity)
    //    {
    //        ObjectStateManager.ChangeObjectState(entity, EntityState.Modified);
    //    }
 
    //    public void AttachModify(string entitySetName, object entity)
    //    {
    //        AttachTo(entitySetName, entity);
    //        SetModified(entity);
    //    }
 
    //    public void AttachModify(string entitySetName, IEnumerable<Object> entities)
    //    {
    //        if (entities != null)
    //            foreach (var entity in entities)
    //                AttachModify(entitySetName, entity);
    //    }

    //}
}